xen: move perform_gunzip to common
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 29 Sep 2015 15:59:03 +0000 (16:59 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 1 Oct 2015 11:52:57 +0000 (12:52 +0100)
commit3d278130e2c250030280540909f2ff8e97a9b418
treea39caf0ed862de9d6bbd6a983306cf504fb383f6
parentd776ffe95324a45626a635cf46e9e9b436083a12
xen: move perform_gunzip to common

The current gunzip code to decompress the Dom0 kernel is implemented in
inflate.c which is included by bzimage.c.

I am looking to doing the same on ARM64 but there is quite a bit of
boilerplate definitions that I would need to import in order for
inflate.c to work correctly.

Instead of copying/pasting the code from x86/bzimage.c, move those
definitions to a new common file, gunzip.c. Export only perform_gunzip
and gzip_check. Leave output_length where it is.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
CC: andrew.cooper3@citrix.com
xen/arch/x86/bzimage.c
xen/common/Makefile
xen/common/gunzip.c [new file with mode: 0644]
xen/include/xen/gunzip.h [new file with mode: 0644]